﻿@model Himall.Web.Models.ShopModel
@using Himall.Core;
@{
    ViewBag.Title = "Details";
}
<div class="container">
    <ul class="nav nav-tabs-custom clearfix">
        <strong>店铺</strong>
        <li><a href="./Management">管理</a></li>
        <li><a href="./Management?type=Auditing">开店审核</a></li>
        <li class="active"><a>查看</a></li>
    </ul>

    <h3 class="table-hd">公司及联系人信息</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>公司名称</td>
                <td>@Model.CompanyName</td>
            </tr>
            <tr>
                <td>公司所在地</td>
                <td>@Model.CompanyRegion</td>
            </tr>
            <tr>
                <td>公司详细地址</td>
                <td>@Model.CompanyAddress</td>
            </tr>
            <tr>
                <td>公司电话</td>
                <td>@Model.CompanyPhone</td>
            </tr>
            <tr>
                <td>员工总数</td>
                <td>@Model.CompanyEmployeeCount.ToDescription()</td>
            </tr>
            <tr>
                <td>注册资金</td>
                <td>@Model.CompanyRegisteredCapital.ToString("f2") 万</td>
            </tr>
            <tr>
                <td>联系人姓名</td>
                <td>@Model.ContactsName</td>
            </tr>
            <tr>
                <td>联系人电话</td>
                <td>@Model.ContactsPhone</td>
            </tr>
            <tr>
                <td>电子邮箱</td>
                <td>@Model.ContactsEmail</td>
            </tr>
        </tbody>
    </table>

    <h3 class="table-hd">营业执照信息（副本）</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>营业执照号</td>
                <td>@Model.BusinessLicenceNumber</td>
            </tr>
            <tr>
                <td>营业执照所在地</td>
                <td>@Model.BusinessLicenceRegionId</td>
            </tr>
            <tr>
                <td>营业执照有效期</td>
                @{
                    var start = Model.BusinessLicenceStart.HasValue ? Model.BusinessLicenceStart.Value.ToShortDateString() : "未设置开始时间";
                    var end = Model.BusinessLicenceEnd.HasValue ? Model.BusinessLicenceEnd.Value.ToShortDateString() : "未设置结束时间";
                }
                <td>@start - @end</td>
            </tr>
            <tr>
                <td>法定经营范围</td>
                <td>@Model.BusinessSphere</td>
            </tr>
            <tr>
                <td>法定代表人</td>
                <td>@Model.legalPerson</td>
            </tr>
            <tr>
                <td>公司成立日期</td>
                @{
                    var date = Model.CompanyFoundingDate.HasValue ? Model.CompanyFoundingDate.Value.ToString("yyyy-MM-dd") : "未设置";
                }
                <td>@date</td>
            </tr>
            <tr>
                <td>营业执照号<br />电子版</td>
                <td><img style="max-width:700px" src="@Model.BusinessLicenceNumberPhoto" alt="" /></td>
            </tr>
        </tbody>
    </table>
    <h3 class="table-hd">组织机构代码证</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>组织机构代码</td>
                <td>@Model.OrganizationCode</td>
            </tr>
            <tr>
                <td>组织机构代码证<br />电子版</td>
                <td><img style="max-width:700px" src="@Model.OrganizationCodePhoto" alt="" /></td>
            </tr>
        </tbody>
    </table>

    @if (!string.IsNullOrEmpty(Model.BusinessLicenseCert))
    {
        <h3 class="table-hd">经营许可类证书</h3>
        <table class="table table-bordered table-striped">
            <colgroup>
                <col class="col-xs-1">
                <col class="col-xs-7">
            </colgroup>
            <tbody>

                @for (int i = 1; i < 4; i++)
                {
                    if (File.Exists(Server.MapPath(Model.BusinessLicenseCert + string.Format("{0}.png", i))))
                    {
                        <tr>
                            <td><img style="max-width:700px" src="@(Model.BusinessLicenseCert + string.Format("{0}.png", i))" alt="" /></td>
                        </tr>
                    }
                }
            </tbody>
        </table>
    }
    @if (!string.IsNullOrEmpty(Model.ProductCert))
    {
        <h3 class="table-hd">产品类证书</h3>
        <table class="table table-bordered table-striped">
            <colgroup>
                <col class="col-xs-1">
                <col class="col-xs-7">
            </colgroup>
            <tbody>
                @for (int i = 1; i < 4; i++)
                {
                    if (File.Exists(Server.MapPath(Model.ProductCert + string.Format("{0}.png", i))))
                    {
                        <tr>
                            <td><img style="max-width:700px" src="@(Model.ProductCert + string.Format("{0}.png", i))" alt="" /></td>
                        </tr>
                    }
                }
            </tbody>
        </table>
    }


    @if (!string.IsNullOrEmpty(Model.OtherCert))
    {
        <h3 class="table-hd">其它证书</h3>
        <table class="table table-bordered table-striped">
            <colgroup>
                <col class="col-xs-1">
                <col class="col-xs-7">
            </colgroup>
            <tbody>
                @for (int i = 1; i < 4; i++)
                {
                    if (File.Exists(Server.MapPath(Model.OtherCert + string.Format("{0}.png", i))))
                    {
                        <tr>
                            <td><img style="max-width:700px" src="@(Model.OtherCert + string.Format("{0}.png", i))" alt="" /></td>
                        </tr>
                    }
                }
            </tbody>
        </table>
    }

    <h3 class="table-hd">一般纳税人证明</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>一般纳税人证明</td>
                <td><img style="max-width:700px" src="@Model.GeneralTaxpayerPhot" alt="" /></td>
            </tr>
        </tbody>
    </table>

    <h3 class="table-hd">结算账号信息</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>银行开户名</td>
                <td>@Model.BankAccountName</td>
            </tr>
            <tr>
                <td>公司银行账号</td>
                <td>@Model.BankAccountNumber</td>
            </tr>
            <tr>
                <td>开户银行支行名称</td>
                <td>@Model.BankName</td>
            </tr>
            <tr>
                <td>支行联行号</td>
                <td>@Model.BankCode</td>
            </tr>
            <tr>
                <td>开户银行所在地</td>
                <td>@Model.BankRegionId</td>
            </tr>
            <tr>
                <td>开户银行许可证<br />电子版</td>
                <td><img style="max-width:700px" src="@Model.BankPhoto" alt="" /></td>
            </tr>
        </tbody>
    </table>

    <h3 class="table-hd">税务登记证</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>税务登记证号</td>
                <td>@Model.TaxRegistrationCertificate</td>
            </tr>
            <tr>
                <td>纳税人识别号</td>
                <td>@Model.TaxpayerId</td>
            </tr>
            <tr>
                <td>税务登记证号<br />电子版</td>
                <td><img style="max-width:700px" src="@Model.TaxRegistrationCertificatePhoto" alt="" /></td>
            </tr>
        </tbody>
    </table>

    <h3 class="table-hd">店铺经营信息</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>卖家帐号</td>
                <td>@Model.Account</td>
            </tr>
            <tr>
                <td>店铺名称</td>
                <td>@Model.Name</td>
            </tr>
            <tr>
                <td>店铺等级</td>
                <td>@Model.ShopGrade</td>
            </tr>

            @if (File.Exists(Server.MapPath(Model.PayPhoto)))
            {
                <tr>
                    <td>付款凭证</td>
                    <td><img style="max-width:700px" src="@Model.PayPhoto" alt="" /></td>
                </tr>
            }

            <tr>
                <td>付款凭证说明</td>
                <td>@Model.PayRemark</td>
            </tr>
        </tbody>
    </table>
    <h3 class="table-hd">经营类目</h3>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>商品类目</th>
                <th>分佣比例</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.BusinessCategory)
            {
                <tr>
                    <td>@item.Name</td>
                    <td>@Math.Round(item.CommisRate, 2) %</td>
                </tr>
            }

        </tbody>
    </table>

    <h3 class="table-hd">平台审核信息</h3>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col class="col-xs-1">
            <col class="col-xs-7">
        </colgroup>
        <tbody>
            <tr>
                <td>审核状态</td>
                <td>@ViewBag.PassStr</td>
            </tr>
        </tbody>
    </table>


</div>
